package com.github.natholdallas

import com.github.natholdallas.etc.UniqueNameGenerator
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
import org.springframework.context.ApplicationContext
import org.springframework.context.annotation.ComponentScan
import org.springframework.core.env.Environment
import org.springframework.data.jpa.repository.config.EnableJpaAuditing

@EnableJpaAuditing
@SpringBootApplication
@ComponentScan(nameGenerator = UniqueNameGenerator::class)
open class App

lateinit var context: ApplicationContext
lateinit var env: Environment

fun main(args: Array<String>) {
    context = runApplication<App>(*args)
    env = context.environment
}
